<%--
  Created by IntelliJ IDEA.
  User: Mi
  Date: 2021/9/25
  Time: 10:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<head>
    <title>招聘者-修改职位</title>
    <link rel="icon" href="/hire/imgs/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="/hire/css/employer/recruitment/edit_recruitment.css">
</head>
<body>
<%@include file="./../employer_nav.jsp" %>
<div class="mypost">
    <div class="layui-container">
        <div class="layui-row">
            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend>我发布的职位</legend>
            </fieldset>
            <form class="layui-form" action="#" id="edit_form">
                <input type="text" value="${recruitment.id}" style="display: none" name="id" id="recruitment">
                <div class="layui-form-item">
                    <label class="layui-form-label">职位名称</label>
                    <div class="layui-input-inline">
                        <input type="text" name="name" lay-verify="required" value="${recruitment.name}"
                               autocomplete="off" class="layui-input" id="name">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">薪资范围</label>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input type="text" name="salaryLower" placeholder="￥" autocomplete="off"
                                   lay-verify="required"  value="${recruitment.salaryLower}" id="salaryLower" class="layui-input">
                        </div>
                        <div class="layui-form-mid">-</div>
                        <div class="layui-input-inline" style="width: 100px;">
                            <input type="text" name="salaryUpper" placeholder="￥" autocomplete="off"
                                   lay-verify="required"  value="${recruitment.salaryUpper}" id="salaryUpper" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">经验要求</label>
                    <div class="layui-input-inline">
                        <select name="experience">
                            <option value="经验不限" <c:if test="${recruitment.experience=='经验不限'}">selected</c:if>>经验不限
                            </option>
                            <option value="1-3年" <c:if test="${recruitment.experience=='1-3年'}">selected</c:if>>1-3年
                            </option>
                            <option value="3-5年" <c:if test="${recruitment.experience=='3-5年'}">selected</c:if>>3-5年
                            </option>
                            <option value="5-10年" <c:if test="${recruitment.experience=='5-10年'}">selected</c:if>>
                                5-10年
                            </option>
                            <option value="10年以上" <c:if test="${recruitment.experience=='10年以上'}">selected</c:if>>
                                10年以上
                            </option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">学历要求</label>
                    <div class="layui-input-inline">
                        <select name="education">
                            <option value="学历不限" <c:if test="${recruitment.education=='学历不限'}">selected</c:if>>学历不限
                            </option>
                            <option value="小学" <c:if test="${recruitment.education=='小学'}">selected</c:if>>小学</option>
                            <option value="初中" <c:if test="${recruitment.education=='初中'}">selected</c:if>>初中</option>
                            <option value="高中" <c:if test="${recruitment.education=='高中'}">selected</c:if>>高中</option>
                            <option value="中专" <c:if test="${recruitment.education=='中专'}">selected</c:if>>中专</option>
                            <option value="专科" <c:if test="${recruitment.education=='专科'}">selected</c:if>>专科</option>
                            <option value="本科" <c:if test="${recruitment.education=='本科'}">selected</c:if>>本科</option>
                            <option value="硕士" <c:if test="${recruitment.education=='硕士'}">selected</c:if>>硕士</option>
                            <option value="博士" <c:if test="${recruitment.education=='博士'}">selected</c:if>>博士</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">职位福利</label>
                    <div class="layui-input-block">
                        <input type="text" name="welfare" placeholder="请输入职位福利"
                               autocomplete="off" class="layui-input" value="${recruitment.welfare}">
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">岗位职责</label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入岗位职责" id="duty" class="layui-textarea"
                        >${recruitment.duty}</textarea>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">职位要求</label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入职位要求" id="requirement"
                                  class="layui-textarea">${recruitment.requirement}</textarea>
                    </div>
                </div>
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">标签选择</label>
                    <div class="wrap">
                        <div class="label-selected">
                            <a href="javascript:;" class="layui-btn layui-btn-sm show-labelitem"
                               style="float: right; margin: 4px; display: block;line-height: 30px;">展开标签库 </a>
                            <a href="javascript:;" class="layui-btn layui-btn-sm hide-labelitem"
                               style="float: right; margin: 4px; display: none;line-height: 30px;">收起标签库 </a>
                            <input type="hidden" name="label">
                            <c:forEach items="${tagList}" var="tl">
                                <li data="${tl.id}">${tl.details}</li>
                            </c:forEach>
                        </div>
                        <div class="layui-col-md12" id="labelItem">
                            <c:forEach items="${tag}" var="tag">
                                <div class="label-item">
                                    <p style="margin-left: 10px;padding-bottom: 10px">${tag.labelType.name}</p>
                                        <%--                                    <a href="javascript:;" class="replacelable" style="position: absolute;right:1rem;bottom:.75rem;color: #1994dc" onselectstart="return false">换一批</a>--%>
                                    <c:forEach items="${tag.tagList}" var="t">
                                        <li data="${t.id}"

                                                <c:forEach items="${tagList}" var="tl">
                                                    <c:if test="${t.id == tl.id}">class="selected"</c:if>
                                                </c:forEach>
                                        >
                                            <span>${t.details}</span>
                                        </li>
                                    </c:forEach>
                                </div>
                            </c:forEach>
                        </div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">联系人</label>
                    <div class="layui-input-inline">
                        <input type="text" name="contactName" lay-verify="required" placeholder="请输入联系人"
                               value="${recruitment.contactName}" autocomplete="off" id="contact_name"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">联系电话</label>
                    <div class="layui-input-inline">
                        <input type="text" name="contactPhone" lay-verify="required" placeholder="请输入联系电话"
                               value="${recruitment.contactPhone}" id="contact_phone" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">联系邮箱</label>
                    <div class="layui-input-inline">
                        <input type="text" name="email" lay-verify="required" placeholder="请输入联系邮箱"
                               value="${recruitment.email}" id="email" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="post-btn">
                    <input type="button" class="layui-btn layui-btn-fluid" value="修改" data-type="send"
                           id="send"></input>
                    <input type="button" class="layui-btn layui-btn-fluid" value="取消" data-type="cancel"
                           id="cancel"></input>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="/hire/js/employer/recruitment/edit_recruitment.js"></script>
</body>
</html>
